home *** CD-ROM | disk | FTP | other *** search
-
-
-
- nnnnggggeeeetttteeeebbbbllllkkkk((((DDDD3333)))) nnnnggggeeeetttteeeebbbbllllkkkk((((DDDD3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk - get an empty buffer of the specified size
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_bbbb_uuuu_ffff_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
- _bbbb_uuuu_ffff______tttt _****_nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk_((((_ssss_iiii_zzzz_eeee______tttt _b_s_i_z_e_))))_;;;;
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _b_s_i_z_e Size of the buffer being requested.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk retrieves a buffer [see _bbbb_uuuu_ffff(D4)] of size _b_s_i_z_e from the buffer
- cache and returns a pointer to the buffer header. If a buffer is not
- available, _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk dynamically allocates one. If memory is not
- immediately available, _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk will sleep until enough memory has been
- freed to allocate the buffer.
-
- RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
- A pointer to the buffer header structure is returned.
-
- UUUUSSSSAAAAGGGGEEEE
- When the driver _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy(D2) routine receives a buffer header from the
- kernel, all the necessary members are already initialized. However, when
- a driver allocates buffers for its own use, it must set up some of the
- members before calling its _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine.
-
- The following list describes the state of these members when the buffer
- header is received from _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk:
-
- _bbbb______ffff_llll_aaaa_gggg_ssss is set to indicate the transfer is from the user's
- buffer to the kernel. The driver must set the _BBBB______RRRR_EEEE_AAAA_DDDD
- flag if the transfer is from the kernel to the user's
- buffer.
-
- _bbbb______eeee_dddd_eeee_vvvv is set to _NNNN_OOOO_DDDD_EEEE_VVVV and must be initialized by the driver.
-
- _bbbb______bbbb_cccc_oooo_uuuu_nnnn_tttt is set to _b_s_i_z_e.
-
- _bbbb______uuuu_nnnn_...._bbbb______aaaa_dddd_dddd_rrrr is set to the buffer's virtual address.
-
- _bbbb______bbbb_llll_kkkk_nnnn_oooo is not initialized by _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk, and must be
- initialized by the driver
-
- Typically, block drivers do not allocate buffers. The buffer is
- allocated by the kernel, and the associated buffer header is used as an
- argument to the driver _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine. However, to implement some
- special features, such as _iiii_oooo_cccc_tttt_llll(D2) commands that perform I/O, the driver
- may need its own buffer space. The driver can get the buffer space from
- the system by using _gggg_eeee_tttt_eeee_bbbb_llll_kkkk(D3) or _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk. Or the driver can choose to
- use its own memory for the buffer and only allocate a buffer header with
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- nnnnggggeeeetttteeeebbbbllllkkkk((((DDDD3333)))) nnnnggggeeeetttteeeebbbbllllkkkk((((DDDD3333))))
-
-
-
- _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff(D3).
-
- Note that buffers allocated via _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk must be freed using either
- _bbbb_rrrr_eeee_llll_ssss_eeee(D3) or _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3).
-
- LLLLeeeevvvveeeellll
- Base only.
-
- SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
- Can sleep.
-
- Driver-defined basic locks and read/write locks may not be held across
- calls to this function.
-
- Driver-defined sleep locks may be held across calls to this function.
-
- RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
- _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3), _bbbb_rrrr_eeee_llll_ssss_eeee(D3), _bbbb_uuuu_ffff(D4), _gggg_eeee_tttt_eeee_bbbb_llll_kkkk(D3)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-